05. The Engine

The Engine Heading

The Engine

ND004 C01 L03 05 The Engine

The Engine Recap

Takeaways

The Engine

  • 1 of 3 main layers for how you may choose to interact with the database.
  • Is the lowest level layer of interacting with the database, and is much like using the DBAPI directly. Very similar to using psycopg2, managing a connection directly.

Moreover,

  • The Engine in SQLAlchemy refers to both itself, the Dialect and the Connection Pool, which all work together to interface with our database.
  • A connection pool gets automatically created when we create a SQLAlchemy engine.

Resources

SQLAlchemy Docs on the Engine .

The Engine Quiz

We use an engine to interact with our database, much like how we would interact with a:

SOLUTION: DBAPI

The Engine Quiz 2

True/False: the engine is the highest level layer of abstraction offered in SQLAlchemy for interacting with a database.

SOLUTION: False